package cn.com.api.service.impl.base;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.com.api.entity.U_cate;

import cn.com.api.mapper.U_cateMapper;

import cn.com.api.service.U_cateService;

/**
 * 
 **/
@Service
public class U_cateServiceImplBase {
	@Autowired
	private U_cateMapper U_cateMapper;
    
    // 根据id获取
	public U_cate findU_cateById(Integer id){
		U_cate u_cate = U_cateMapper.findU_cateById( id );
		return u_cate;
	}
    
    //查看数据集
	public List<U_cate> findU_cates(){
        List<U_cate> u_cates = U_cateMapper.findU_cates();
		return u_cates;
    }
    
	// 添加
	public int insertU_cate(U_cate u_cate){
		int ret_I= U_cateMapper.insertU_cate(u_cate);
		return ret_I;
	}

	// 修改
	public int updateU_cate(U_cate u_cate){
		int ret_I= U_cateMapper.updateU_cate(u_cate);
		return ret_I;
	}
	
    // 删除
	public int deleteU_cate(Integer id){
		int ret_I= U_cateMapper.deleteU_cate( id );
		return ret_I;
	}
	
    // Foreign keys revelant		
		

	//region Indexs revelant
    
    
    //获取根据parent_id	
    public List<U_cate> findU_catesByParent_id(String parent_id){
        List<U_cate> u_cates = U_cateMapper.findU_catesByParent_id(parent_id);
		return u_cates;
    }
    		
 
}


